window: Allow more space at edges for popovers
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 10 Jun 2015 19:02:34 +0000 (21:02 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 11 Jun 2015 15:14:23 +0000 (17:14 +0200)
We're clamping to the visible window edge, which misplaces text handles.

gtk/gtkwindow.c

index 9fe882feb7c9630a265a5737978e6d9cfadfddb3..eea2a15379a3d046f6314d6a7c7ad019524a7535 100644 (file)
@@ -6384,7 +6384,7 @@ popover_get_rect (GtkWindowPopover      *popover,
         }
       else
         rect->y = CLAMP (popover->rect.y + (popover->rect.height / 2) -
-                         (req.height / 2), win_alloc.y, win_alloc.y + win_alloc.height - req.height);
+                         (req.height / 2), 0, win_alloc.y + win_alloc.height + win_border.bottom - req.height);
 
       if ((popover->pos == GTK_POS_LEFT) ==
           (gtk_widget_get_direction (popover->widget) == GTK_TEXT_DIR_LTR))
@@ -6416,7 +6416,7 @@ popover_get_rect (GtkWindowPopover      *popover,
         }
       else
         rect->x = CLAMP (popover->rect.x + (popover->rect.width / 2) -
-                         (req.width / 2), win_alloc.x, win_alloc.x + win_alloc.width - req.width);
+                         (req.width / 2), 0, win_alloc.x + win_alloc.width + win_border.right - req.width);
 
       if (popover->pos == GTK_POS_TOP)
         {